package cn.edu.xmist.proxy.staticproxy;

import cn.edu.xmist.proxy.Hello;
import cn.edu.xmist.proxy.Hello2Impl;
import cn.edu.xmist.proxy.HelloImpl;

import java.lang.reflect.Proxy;

public class HelloTest {
    public static void main(String[] args) {
        Hello hello = new HelloImpl();
        hello.say("zhangshan");

        HelloProxy helloProxy = new HelloProxy(hello);
        helloProxy.say("lisi");

        Hello2Impl hello2 = new Hello2Impl();
        Hello2Proxy hello2Proxy = new Hello2Proxy(hello2);
        hello2Proxy.doSomething();

    }
}
